home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / SASC_6.0_Disk_4.adf / Compiler_Headers / Include / dos / notify.h < prev    next >
C/C++ Source or Header  |  1992-07-30  |  2KB  |  100 lines

  1. #ifndef DOS_NOTIFY_H
  2. #define DOS_NOTIFY_H
  3. /*
  4. **
  5. **    $Filename: dos/notify.h $
  6. **    $Release: 2.04 Includes, V37.4 $
  7. **    $Revision: 36.8 $
  8. **    $Date: 90/08/29 $
  9. **
  10. **    dos notification definitions
  11. **
  12. **    (C) Copyright 1989-1991 Commodore-Amiga, Inc.
  13. **        All Rights Reserved
  14. **
  15. */
  16.  
  17. #ifndef EXEC_TYPES_H
  18. #include "exec/types.h"
  19. #endif
  20.  
  21. #ifndef EXEC_PORTS_H
  22. #include "exec/ports.h"
  23. #endif
  24.  
  25. #ifndef EXEC_TASKS_H
  26. #include "exec/tasks.h"
  27. #endif
  28.  
  29.  
  30. /* use of Class and code is discouraged for the time being - we might want to
  31.    change things */
  32. /* --- NotifyMessage Class ------------------------------------------------ */
  33. #define NOTIFY_CLASS    0x40000000
  34.  
  35. /* --- NotifyMessage Codes ------------------------------------------------ */
  36. #define NOTIFY_CODE    0x1234
  37.  
  38.  
  39. /* Sent to the application if SEND_MESSAGE is specified.            */
  40.  
  41. struct NotifyMessage {
  42.     struct Message nm_ExecMessage;
  43.     ULONG  nm_Class;
  44.     UWORD  nm_Code;
  45.     struct NotifyRequest *nm_NReq;    /* don't modify the request! */
  46.     ULONG  nm_DoNotTouch;        /* like it says!  For use by handlers */
  47.     ULONG  nm_DoNotTouch2;        /* ditto */
  48. };
  49.  
  50. /* Do not modify or reuse the notifyrequest while active.            */
  51. /* note: the first LONG of nr_Data has the length transfered            */
  52.  
  53. struct NotifyRequest {
  54.     UBYTE *nr_Name;
  55.     UBYTE *nr_FullName;        /* set by dos - don't touch */
  56.     ULONG nr_UserData;        /* for applications use */
  57.     ULONG nr_Flags;
  58.  
  59.     union {
  60.  
  61.         struct {
  62.         struct MsgPort *nr_Port;    /* for SEND_MESSAGE */
  63.         } nr_Msg;
  64.  
  65.         struct {
  66.         struct Task *nr_Task;        /* for SEND_SIGNAL */
  67.         UBYTE nr_SignalNum;        /* for SEND_SIGNAL */
  68.         UBYTE nr_pad[3];
  69.         } nr_Signal;
  70.     } nr_stuff;
  71.  
  72.     ULONG nr_Reserved[4];        /* leave 0 for now */
  73.  
  74.     /* internal use by handlers */
  75.     ULONG nr_MsgCount;        /* # of outstanding msgs */
  76.     struct MsgPort *nr_Handler;    /* handler sent to (for EndNotify) */
  77. };
  78.  
  79. /* --- NotifyRequest Flags ------------------------------------------------ */
  80. #define NRF_SEND_MESSAGE    1
  81. #define NRF_SEND_SIGNAL        2
  82. #define NRF_WAIT_REPLY        8
  83. #define NRF_NOTIFY_INITIAL    16
  84.  
  85. /* do NOT set or remove NRF_MAGIC!  Only for use by handlers! */
  86. #define NRF_MAGIC    0x80000000
  87.  
  88. /* bit numbers */
  89. #define NRB_SEND_MESSAGE    0
  90. #define NRB_SEND_SIGNAL        1
  91. #define NRB_WAIT_REPLY        3
  92. #define NRB_NOTIFY_INITIAL    4
  93.  
  94. #define NRB_MAGIC        31
  95.  
  96. /* Flags reserved for private use by the handler: */
  97. #define NR_HANDLER_FLAGS    0xffff0000
  98.  
  99. #endif /* DOS_NOTIFY_H */
  100.